<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户列表</title>
<link rel="stylesheet" href="../css/booksStyle.css">
<link rel="stylesheet" href="../css/footer.css">
<link rel="stylesheet"
	href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">
<script
	src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script
	src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
	<jsp:include page="navbar.jsp" />
	<div class="col-md-9">
		<div class="container">
			<div class="row">
				<div class="col-md-12">
					<h1 class="display-1 text-center">订单列表</h1>
				</div>
			</div>
		</div>
		<table class="table table-striped table-hover" style="margin:5% 0 0 10%">
			<thead>
				<tr>
					<th>订单编号</th>
					<th>茶叶品名</th>
					<th>用户账号</th>
					<th>用户电话</th>
					<th>用户邮箱</th>
					<th>数量</th>
					<th>总价</th>
					<th>购买时间</th>
				</tr>
			</thead>
			<tbody>
				<!-- foreach 循环进行信息录入 -->
				<c:forEach items="${orders }" var="order">
					<tr>
						<td>${order.id }</td>
						<td>${order.tea.name }</td>
						<td>${order.user.account }</td>
						<td>${order.user.phone }</td>
						<td>${order.user.email }</td>
						<td>${order.count }</td>
						<td>${order.count*order.tea.price }</td>
						<td><fmt:formatDate value="${order.buyDate}"
									pattern="yyyy-MM-dd HH:mm:ss" /></td>
					</tr>
				</c:forEach>
			</tbody>
		</table>
		<!--  		<ul class="pager">
			<c:if test="${curpage > 1}">
				<li><a href="getAllBook.action?pageNum=${curpage - 1 }">上一页</a></li>
			</c:if>
			<li><label>${curpage }</label></li>
			<li><label>/</label></li>
			<li><label>${sumpage }</label></li>
			<c:if test="${curpage < sumpage }">
				<li><a href="#">下一页</a></li>
			</c:if>
		</ul> -->
	</div>
</body>
</html>